package net.carefx.info.query;

import java.util.*;

import cn.ws.client.HL7Client;
public class InfoMigration {

	public static void main(String[] args) throws Exception {		
		InfoDAO dao = new InfoDAO();
		List list = dao.queryByNamedSQL("QueryPatientInfo",null);
		PackageMessage pack = new PackageMessage();
		HL7Client client = new HL7Client();
		for(int i=0;i<list.size();i++)
		{
			Object[] objectArray = (Object[])list.get(i);
			List Diaglist = dao.queryByNamedSQL("QueryDiagInfo",objectArray[68].toString());
			String hl7Str = pack.packageToHL7(objectArray,Diaglist);
			client.requestWS(hl7Str);
		}
	}

}
